package com.mew.common.vo;

import com.mew.common.util.NumberUtil;
import lombok.*;


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LevelVO {
    private int userLvUpdate; //0 not up， 1 update 2 up
    private int userLevel;
    private long expValue;
    private long ruleExp;
    private long upgradeGold;

    private int vipLvUpdate; //0 not up，  1 update 2 up
    private int vipLevel;
    private long vipExpValue;

    public int expPercent(){
        if (0 == this.expValue || 0 == this.ruleExp){
            return 0;
        }

        return NumberUtil.proportion(this.expValue, this.ruleExp, 100);
    }

}
